package ar.com.fiuba;

import org.springframework.context.support.ClassPathXmlApplicationContext;

public class ServiceLocator {

	private static ClassPathXmlApplicationContext ctx;
	
	private static ServiceLocator instance = new ServiceLocator(); 
	
	private ServiceLocator(){
		ctx = new ClassPathXmlApplicationContext("ctx/applicationContext.xml");
	}
	
	public static ServiceLocator getInstance(){
		return instance;
	}
	
	public Object getService(String service){
		return ctx.getBean(service);
	}
}
